import java.util.Arrays;
import java.util.Scanner;

public class Text1 {
    public static void main(String[] args) {

        int[] A = new int[1];
        int[] B = new int[] {1};
        merge(A,0,B,1);
        System.out.println(Arrays.toString(A));


    }


    public static void merge(int A[], int m, int B[], int n) {
        int i = m - 1;
        int j = n - 1;
        int k = m + n - 1;
        while(i>=0 && j>=0) {
            if(A[i] > B[j]) {
                A[k] = A[i];
                i--;
                k--;
            }else {
                A[k] = B[j];
                j--;
                k--;
            }
        }

        while(i >= 0) {
            A[k] = A[i];
            i--;
            k--;
        }
        while(j >= 0) {
            A[k] = B[j];
            j--;
            k--;
        }
    }
}
